$clear @s *[custom_data~{id:"voidogen"}] $(needCount)
playsound block.note_block.bell master @a ~ ~ ~ 0.8

execute if data entity @n[tag=seller,distance=..500,type=item_display] item.components."minecraft:custom_data".void_shop{give:false} run return fail

summon armor_stand ~ ~ ~ {Small:true,Invisible:true,Invulnerable:true,Marker:true,Tags:["VSTradeTempEntity"]}
$loot replace entity @n[tag=VSTradeTempEntity,distance=..1,type=armor_stand] weapon.mainhand loot $(loot_table)
$item modify entity @n[tag=VSTradeTempEntity,distance=..1,type=armor_stand] weapon.mainhand $(item_modifier)

execute anchored eyes run summon item ^ ^ ^ {Item:{id:"apple"},Tags:["VSTradeTempItemEntity","TradeItem"]}
data modify entity @n[tag=VSTradeTempItemEntity,distance=..100,type=item] Item set from entity @n[tag=VSTradeTempEntity,distance=..100,type=armor_stand] HandItems[0]

playsound block.note_block.bell master @a ~ ~ ~ 0.8

data modify entity @n[tag=VSTradeTempItemEntity,type=item,distance=..100] Owner set from entity @p[tag=buyer] UUID

tag @n[tag=VSTradeTempItemEntity,type=item,distance=..100] remove VSTradeTempItemEntity
kill @n[tag=VSTradeTempEntity,type=armor_stand,distance=..1]